Optimal. Leaf size=52 \[ \frac{(a B+A b) \sin ^2(c+d x)}{2 d}+\frac{a A \sin (c+d x)}{d}+\frac{b B \sin ^3(c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0537233, antiderivative size = 52, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.074, Rules used = {2833, 43} \[ \frac{(a B+A b) \sin ^2(c+d x)}{2 d}+\frac{a A \sin (c+d x)}{d}+\frac{b B \sin ^3(c+d x)}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2833
Rule 43
Rubi steps
\begin{align*} \int \cos (c+d x) (a+b \sin (c+d x)) (A+B \sin (c+d x)) \, dx &=\frac{\operatorname{Subst}\left (\int (a+x) \left (A+\frac{B x}{b}\right ) \, dx,x,b \sin (c+d x)\right )}{b d}\\ &=\frac{\operatorname{Subst}\left (\int \left (a A+\frac{(A b+a B) x}{b}+\frac{B x^2}{b}\right ) \, dx,x,b \sin (c+d x)\right )}{b d}\\ &=\frac{a A \sin (c+d x)}{d}+\frac{(A b+a B) \sin ^2(c+d x)}{2 d}+\frac{b B \sin ^3(c+d x)}{3 d}\\ \end{align*}
Mathematica [A] time = 0.0802957, size = 45, normalized size = 0.87 \[ \frac{\sin (c+d x) \left (3 (a B+A b) \sin (c+d x)+6 a A+2 b B \sin ^2(c+d x)\right )}{6 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.029, size = 44, normalized size = 0.9 \begin{align*}{\frac{1}{d} \left ({\frac{B \left ( \sin \left ( dx+c \right ) \right ) ^{3}b}{3}}+{\frac{ \left ( Ab+aB \right ) \left ( \sin \left ( dx+c \right ) \right ) ^{2}}{2}}+A\sin \left ( dx+c \right ) a \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.970237, size = 61, normalized size = 1.17 \begin{align*} \frac{2 \, B b \sin \left (d x + c\right )^{3} + 6 \, A a \sin \left (d x + c\right ) + 3 \,{\left (B a + A b\right )} \sin \left (d x + c\right )^{2}}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.38161, size = 123, normalized size = 2.37 \begin{align*} -\frac{3 \,{\left (B a + A b\right )} \cos \left (d x + c\right )^{2} + 2 \,{\left (B b \cos \left (d x + c\right )^{2} - 3 \, A a - B b\right )} \sin \left (d x + c\right )}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.600874, size = 75, normalized size = 1.44 \begin{align*} \begin{cases} \frac{A a \sin{\left (c + d x \right )}}{d} - \frac{A b \cos ^{2}{\left (c + d x \right )}}{2 d} - \frac{B a \cos ^{2}{\left (c + d x \right )}}{2 d} + \frac{B b \sin ^{3}{\left (c + d x \right )}}{3 d} & \text{for}\: d \neq 0 \\x \left (A + B \sin{\left (c \right )}\right ) \left (a + b \sin{\left (c \right )}\right ) \cos{\left (c \right )} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.2267, size = 70, normalized size = 1.35 \begin{align*} \frac{2 \, B b \sin \left (d x + c\right )^{3} + 3 \, B a \sin \left (d x + c\right )^{2} + 3 \, A b \sin \left (d x + c\right )^{2} + 6 \, A a \sin \left (d x + c\right )}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]